package dto

import (
	"github.com/gin-gonic/gin"
	"tino_manager/public"
)

type ReservationAddInput struct {
	SiteId    string `json:"site_id" form:"site_id" comment:"场地id" validate:"required"`
	SiteName  string `json:"site_name" form:"site_name" comment:"场地名称" validate:"required"`
	Title     string `json:"title" form:"title" comment:"活动名称" validate:"required"`
	Corporate string `json:"corporate" form:"corporate" comment:"单位名称" validate:"required"`
	BeginTime string `json:"begin_time" form:"begin_time" comment:"开始时间" validate:"required"`
	//EndTime       string `json:"end_time" form:"end_time" comment:"结算时间" validate:"required"`
	Contact       string `json:"contact" form:"contact" comment:"联系人" validate:"required"`
	Phone         string `json:"phone" form:"phone" comment:"联系电话" validate:"required"`
	PeopleNum     string `json:"people_num" form:"people_num" comment:"活动人数"`
	Options       string `json:"options" form:"options"`
	Remark        string `json:"remark" form:"remark" comment:"备注"`
	MeetingStatus uint8  `json:"meeting_status" form:"meeting_status" comment:"是否需要活动会务筹备"`
	MeetingMark   string `json:"meeting_mark" form:"meeting_mark" comment:"会务筹备备注"`
	ExplainStatus uint8  `json:"explain_status" form:"explain_status" comment:"是否需要专业讲解"`
	ExplainMark   string `json:"explain_mark" form:"explain_mark" comment:"专业讲解备注"`
	CareStatus    uint8  `json:"care_status" form:"care_status" comment:"有无需要特殊照顾的人员"`
	CareMark      string `json:"care_mark" form:"care_mark" comment:"特殊照顾备注"`
}

func (params *ReservationAddInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type ReservationValidateTimeInput struct {
	BeginTime     string `json:"begin_time" form:"begin_time" comment:"开始时间" validate:"required"`
	EndTime       string `json:"end_time" form:"end_time" comment:"结算时间" validate:"required"`
	SiteId        string `json:"site_id" form:"site_id" comment:"场地id" validate:"required"`
	ReservationId string `json:"reservation_id" form:"reservation_id" comment:"预约id"`
}

func (params *ReservationValidateTimeInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type ReservationMinePageInput struct {
	Type       string `json:"type" form:"type" comment:"查询类型"`
	UserId     string `json:"user_id" form:"user_id" comment:"用户id"`
	KeyWord    string `json:"keyword" form:"keyword" comment:"搜索关键词"`
	SiteId     string `json:"site_id" form:"site_id" comment:"场地id"`
	PageSize   int    `json:"page_size" form:"page_size" comment:"每页数量" validate:"required,lte=20"`
	PageNumber int    `json:"page_number" form:"page_number" comment:"页码" validate:"required"`
}

func (params *ReservationMinePageInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type ReservationInfo struct {
	Id            string `json:"id" form:"id"`
	SiteId        string `json:"site_id" form:"site_id" `
	SiteName      string `json:"site_name" form:"site_name"`
	Title         string `json:"title" form:"title"`
	Corporate     string `json:"corporate" form:"corporate"`
	BeginTime     string `json:"begin_time" form:"begin_time"`
	EndTime       string `json:"end_time" form:"end_time"`
	Contact       string `json:"contact" form:"contact"`
	Phone         string `json:"phone" form:"phone"`
	PeopleNum     string `json:"people_num" form:"people_num"`
	Options       string `json:"options" form:"options"`
	Remark        string `json:"remark" form:"remark" comment:"备注"`
	MeetingStatus uint8  `json:"meeting_status" form:"meeting_status"`
	MeetingMark   string `json:"meeting_mark" form:"meeting_mark"`
	ExplainStatus uint8  `json:"explain_status" form:"explain_status"`
	ExplainMark   string `json:"explain_mark" form:"explain_mark"`
	CareStatus    uint8  `json:"care_status" form:"care_status"`
	CheckStatus   uint8  `json:"check_status" gorm:"column:check_status;comment:打卡状态"`
	CareMark      string `json:"care_mark" form:"care_mark"`
	CreatedBy     string `json:"created_by" form:"created_by"`
	Status        uint8  `json:"status" form:"status"`
	Star          uint8  `json:"star" gorm:"column:star;comment:评价星级"`
	Comment       string `json:"comments" gorm:"column:comments;comment:评价"`
	DeleteRemark  string `json:"delete_remark" form:"delete_remark"`
	CancelRemark  string `json:"cancel_remark" gorm:"column:cancel_remark;comment:取消备注"`
	AuditStatus   uint8  `json:"audit_status" form:"audit_status" gorm:"column:audit_status;comment:审核状态 0 审核中 1 审核通过 2 审核拒绝"`
	AuditRemark   string `json:"audit_remark" form:"audit_remark" gorm:"column:audit_remark;comment:审核备注"`
	IsDelete      uint8  `json:"is_delete" form:"is_delete"`
	UpdatedAt     string `json:"update_at" form:"update_at"`
	CreatedAt     string `json:"create_at" form:"create_at"`
}
type ReservationPageOutput struct {
	List  []ReservationInfo `json:"list"`
	Total int64             `json:"total"`
}
type ReservationRemoveInput struct {
	Id           string `json:"id" form:"id" comment:"预约id" validate:"required"`
	DeleteRemark string `json:"delete_remark" form:"delete_remark" comment:"删除原因" validate:"required"`
}

func (params *ReservationRemoveInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type ReservationDetailInput struct {
	Id string `json:"id" form:"id" comment:"预约id" validate:"required"`
}

func (params *ReservationDetailInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type ReservationUpdateInput struct {
	Id        string `json:"id" form:"id" comment:"预约id" validate:"required"`
	SiteId    string `json:"site_id" form:"site_id" comment:"场地id" validate:"required"`
	SiteName  string `json:"site_name" form:"site_name" comment:"场地名称" validate:"required"`
	Title     string `json:"title" form:"title" comment:"活动名称" validate:"required"`
	Corporate string `json:"corporate" form:"corporate" comment:"单位名称" validate:"required"`
	BeginTime string `json:"begin_time" form:"begin_time" comment:"开始时间" validate:"required"`
	//EndTime       string `json:"end_time" form:"end_time" comment:"结算时间" validate:"required"`
	Contact       string `json:"contact" form:"contact" comment:"联系人" validate:"required"`
	Phone         string `json:"phone" form:"phone" comment:"联系电话" validate:"required"`
	Options       string `json:"options" form:"options" comment:"备注项" validate:"required"`
	Remark        string `json:"remark" form:"remark" comment:"备注"`
	PeopleNum     string `json:"people_num" form:"people_num" comment:"活动人数"`
	MeetingStatus uint8  `json:"meeting_status" form:"meeting_status" comment:"是否需要活动会务筹备"`
	MeetingMark   string `json:"meeting_mark" form:"meeting_mark" comment:"会务筹备备注"`
	ExplainStatus uint8  `json:"explain_status" form:"explain_status" comment:"是否需要专业讲解"`
	ExplainMark   string `json:"explain_mark" form:"explain_mark" comment:"专业讲解备注"`
	CareStatus    uint8  `json:"care_status" form:"care_status" comment:"有无需要特殊照顾的人员"`
	CareMark      string `json:"care_mark" form:"care_mark" comment:"特殊照顾备注"`
}

func (params *ReservationUpdateInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type AuditPageInput struct {
	AuditStatus string `json:"audit_status" form:"audit_status" comment:"审核状态"`
	Status      string `json:"status" form:"status" comment:"取消状态"`
	IsDelete    string `json:"is_delete" form:"is_delete" comment:"删除状态"`
	KeyWord     string `json:"keyword" form:"keyword" comment:"搜索关键词"`
	PageSize    int    `json:"page_size" form:"page_size" comment:"每页数量" validate:"required,lte=20"`
	PageNumber  int    `json:"page_number" form:"page_number" comment:"页码" validate:"required"`
}

func (params *AuditPageInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type AuditInput struct {
	Id          string `json:"id" form:"id" comment:"预约id" validate:"required"`
	AuditStatus uint8  `json:"audit_status" form:"audit_status" comment:"审核状态"`
	AuditRemark string `json:"audit_remark" form:"audit_remark"`
}

func (params *AuditInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type ExportInfo struct {
	SiteName  string `json:"site_name" form:"site_name" comment:"场地名称" validate:"required"`
	Title     string `json:"title" form:"title" comment:"活动名称" validate:"required"`
	Corporate string `json:"corporate" form:"corporate" comment:"单位名称" validate:"required"`
	BeginTime string `json:"begin_time" form:"begin_time" comment:"开始时间" validate:"required"`
	EndTime   string `json:"end_time" form:"end_time" comment:"结算时间" validate:"required"`
	Contact   string `json:"contact" form:"contact" comment:"联系人" validate:"required"`
	Phone     string `json:"phone" form:"phone" comment:"联系电话" validate:"required"`
	PeopleNum string `json:"people_num" form:"people_num" comment:"活动人数"`
	Remark    string `json:"remark" form:"remark" comment:"备注"`
}
type ExportInput struct {
	SiteId string `json:"site_id" form:"site_id" comment:"场地id" validate:"required"`
}

func (params *ExportInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type CommentInput struct {
	Id      string `json:"id" form:"id" comment:"预约id" validate:"required"`
	Star    uint8  `json:"star" form:"id" comment:"星级"`
	Comment string `json:"comment" form:"comment" validate:"required"`
}

func (params *CommentInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type CancelInput struct {
	Id           string `json:"id" form:"id" comment:"预约id" validate:"required"`
	CancelRemark string `json:"cancel_remark" form:"cancel_remark" comment:"取消备注" validate:"required"`
}

func (params *CancelInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}

type ReservationCheckInfo struct {
	Id        string  `json:"id"`
	Title     string  `json:"title"`
	SiteName  string  `json:"site_name"`
	SiteId    string  `json:"site_id"`
	Address   string  `json:"address" gorm:"column:address;comment:场地地址"`
	Longitude float64 `json:"longitude" gorm:"column:longitude;comment:经度"`
	Latitude  float64 `json:"latitude" gorm:"column:latitude;comment:纬度"`
}
type CheckInInput struct {
	Id string `json:"id" form:"id" comment:"预约Id" validate:"required"`
}

func (params *CheckInInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, params)
}
